package com.gpzx.zx.module.mine.frame.presenter;


import android.content.Intent;

import com.gpzx.zx.module.login.ui.activity.LoginActivity;
import com.gpzx.zx.module.mine.frame.view.LogoutAccountView;
import com.gpzx.zx.module.mine.ui.activity.LogoutAccountActivity;
import com.wkq.base.frame.mosby.MvpBasePresenter;
import com.wkq.database.utils.DataBaseUtils;

/**
 * 作者: 吴奎庆
 * <p>
 * 时间: 2019/3/22
 * <p>
 * 简介:
 */
public class LogoutAccountPresenter extends MvpBasePresenter<LogoutAccountView> {
    public void logoutAccount(LogoutAccountActivity mContext) {
        DataBaseUtils.logout(mContext);

        Intent intent = new Intent(mContext, LoginActivity.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
        mContext.startActivity(intent);
    }
}
